-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docs] Unify strategy descriptions and add Telemetry sections #2060
[Docs] Unify strategy descriptions and add Telemetry sections #2060
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2060 +/- ##
==========================================
+ Coverage 83.67% 83.69% +0.01%
==========================================
Files 312 312
Lines 7106 7114 +8
Branches 1054 1054
==========================================
+ Hits 5946 5954 +8
Misses 789 789
Partials 371 371
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Martin Costello <martin@martincostello.com>
@martintmk Is there any particular reason why the TimeSpan? retryAfter = null;
if (lease.TryGetMetadata(MetadataName.RetryAfter, out TimeSpan retryAfterValue))
{
retryAfter = retryAfterValue;
}
var args = new OnRateLimiterRejectedArguments(context, lease);
_telemetry.Report(new(ResilienceEventSeverity.Error, RateLimiterConstants.OnRateLimiterRejectedEvent), context, args);
if (OnLeaseRejected != null)
{
await OnLeaseRejected(new OnRateLimiterRejectedArguments(context, lease)).ConfigureAwait(context.ContinueOnCapturedContext);
}
var exception = retryAfter.HasValue ? new RateLimiterRejectedException(retryAfter.Value) : new RateLimiterRejectedException();
return Outcome.FromException<TResult>(exception.TrySetStackTrace()); |
Frankly, I don't know :D It was probably just an omission as we didn't have any use-case where this would be required. If there is a real-world use-case we can add it there. |
One thing I am wondering is to add |
Good idea, I'll do that. |
Co-authored-by: Martin Costello <martin@martincostello.com>
@martintmk Do I see it correctly that this |
Co-authored-by: Martin Costello <martin@martincostello.com>
Looks like some leftovers from a refactor to me. |
@martincostello , @martintmk How do you like it? |
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
@martintmk I've just realized that the I know it is mentioned in the documentation that the unit is millisecond, but I would rather prefer self-explanatory events. Expected
Actual
Same applies for Can we fix these in a separate PR? |
Sure, makes sense. Just don't put the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just few nits, looks good otherwise
Co-authored-by: martintmk <103487740+martintmk@users.noreply.github.com>
Pull Request
The issue or feature being addressed
I have found the strategies documentation paged a bit inconsistent:
About
section sometimes contains a short description while other times doesn't.Defaults
sections rather vague.Details on the issue fix or feature implementation
Confirm the following